package com.example.demo.controller;

import com.example.demo.pojo.huodongg;
import com.example.demo.service.sv.huodong;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/huodong")
public class huodongController {
    @Autowired
    huodong huodong;

    @RequestMapping("update")
    @ResponseBody
     public huodongg update(@RequestParam("zhang") String zhang, @RequestParam("yue") String yue, @RequestParam("ri") String ri, @RequestParam("nian") String nian){
       return huodong.update(zhang,ri,yue,nian);
    }

    @RequestMapping("/qiandao")
    @ResponseBody
    public String qindao(@RequestParam("zhang") String zhang){
         String a= huodong.qiandao(zhang);
     return  a;
    }
    @RequestMapping("/leijijiangli")
    @ResponseBody
    public void leijiangli(@RequestParam("zhang") String zhang,@RequestParam("leijijiangli") int leijijiangli){
       huodong.leijijiangli(zhang,leijijiangli);

    }

    @RequestMapping("kanshipinlingjindou")
    @ResponseBody
    public int  kanshipin(@RequestParam("zhang") String zhang)
    {   return huodong.kanshipin(zhang);

    }

    @RequestMapping("huanleguoyuan")
    @ResponseBody
    public int guoyuan(@RequestParam("zhang") String zhang)
    {
        return  huodong.guoshuzhi(zhang);
    }

    @RequestMapping("xingyundali")
    @ResponseBody
     public int xingyundali(@RequestParam("zhang") String zhang) {

     return  huodong.xingyundali(zhang);
    }


}
